home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / AnyDBM_File.z / AnyDBM_File
Encoding:
Text File  |  1998-10-30  |  3.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4. AAAAnnnnyyyyDDDDBBBBMMMM____FFFFiiiilllleeee((((3333))))                                                  AAAAnnnnyyyyDDDDBBBBMMMM____FFFFiiiilllleeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      AnyDBM_File - provide framework for multiple DBMs
  10.  
  11.      NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM
  12.      implementations
  13.  
  14. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.          use AnyDBM_File;
  16.  
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      This module is a "pure virtual base class"--it has nothing of its own.
  20.      It's just there to inherit from one of the various DBM packages.  It
  21.      prefers ndbm for compatibility reasons with Perl 4, then Berkeley DB (See
  22.      the _D_B__F_i_l_e manpage), GDBM, SDBM (which is always there--it comes with
  23.      Perl), and finally ODBM.   This way old programs that used to use NDBM
  24.      via _d_b_m_o_p_e_n() can still do so, but new ones can reorder @ISA:
  25.  
  26.          BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File) }
  27.          use AnyDBM_File;
  28.  
  29.      Having multiple DBM implementations makes it trivial to copy database
  30.      formats:
  31.  
  32.          use POSIX; use NDBM_File; use DB_File;
  33.          tie %newhash,  'DB_File', $new_filename, O_CREAT|O_RDWR;
  34.          tie %oldhash,  'NDBM_File', $old_filename, 1, 0;
  35.          %newhash = %oldhash;
  36.  
  37.  
  38.      DDDDBBBBMMMM CCCCoooommmmppppaaaarrrriiiissssoooonnnnssss
  39.  
  40.      Here's a partial table of features the different packages offer:
  41.  
  42.                               odbm    ndbm    sdbm    gdbm    bsd-db
  43.                               ----    ----    ----    ----    ------
  44.       Linkage comes w/ perl   yes     yes     yes     yes     yes
  45.       Src comes w/ perl       no      no      yes     no      no
  46.       Comes w/ many unix os   yes     yes[0]  no      no      no
  47.       Builds ok on !unix      ?       ?       yes     yes     ?
  48.       Code Size               ?       ?       small   big     big
  49.       Database Size           ?       ?       small   big?    ok[1]
  50.       Speed                   ?       ?       slow    ok      fast
  51.       FTPable                 no      no      yes     yes     yes
  52.       Easy to build          N/A     N/A      yes     yes     ok[2]
  53.       Size limits             1k      4k      1k[3]   none    none
  54.       Byte-order independent  no      no      no      no      yes
  55.       Licensing restrictions  ?       ?       no      yes     no
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAAnnnnyyyyDDDDBBBBMMMM____FFFFiiiilllleeee((((3333))))                                                  AAAAnnnnyyyyDDDDBBBBMMMM____FFFFiiiilllleeee((((3333))))
  71.  
  72.  
  73.  
  74.      [0] on mixed universe machines, may be in the bsd compat library, which
  75.          is often shunned.
  76.  
  77.      [1] Can be trimmed if you compile for one access method.
  78.  
  79.      [2] See the _D_B__F_i_l_e manpage. Requires symbolic links.
  80.  
  81.      [3] By default, but can be redefined.
  82.  
  83. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  84.      _d_b_m(3), _n_d_b_m(3), _D_B__F_i_l_e(3)
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.